package aop03;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.Date;

public class LogAdvice implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("在"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())+"时间，请求结束了"+target+" 中"+method.getName()+"方法参数为"+args);
    }
}
